package com.itheima.cmp;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class TestComponenet {

    //second, minute, hour, day of month, month, and day of week.
    @Scheduled(cron = "0/2 * * * * *")
    public void test(){
        System.out.println("test:" + System.currentTimeMillis());
    }

//    @Scheduled(fixedDelay = 5000)
    public void test2(){
        System.out.println("test2:" + System.currentTimeMillis());
    }

}
